#include<stdio.h>
#include<Windows.h>

typedef void(*Dllfun)();

int main(){
	Dllfun hello;
	HINSTANCE hdll;
	hdll = LoadLibraryA("C:\\Users\\CWW\\Documents\\Visual Studio 2010\\Projects\\Test\\Debug\\T2est.dll");
	if(hdll == NULL)
	{
		FreeLibrary(hdll);
		MessageBoxA(NULL,"动态链接库打开失败","Warning",MB_OK);
		return 0;
	}
	hello = (Dllfun)GetProcAddress(hdll,"hello");
	if(hello == NULL)
	{
		MessageBoxA(NULL,"接口函数获取失败","Warning",MB_OK);
		FreeLibrary(hdll);
		return 0;
	}
	hello();
	system("pause");
	return 0;
}